int matsize;

struct smat
{
	double m[110][110];
	void init()
	{memset(m, 0, sizeof(m));}
	smat() {init();}
	void eye()
	{init(); for (int i = 0; i < matsize; ++i) m[i][i] = 1;}
};

smat operator * (const smat &a, const smat &b)
{
	smat res;
	for (int i = 0; i < matsize; ++i)
		for (int j = 0; j < matsize; ++j)
			for (int k = 0; k < matsize; ++k)
				res.m[i][j] += a.m[i][k]*b.m[k][j];
	return res;
}

smat operator ^ (smat a, int p)
{
	smat res;
	res.eye();
	for (; p; p>>=1)
	{
		if (p & 1)
			res = res*a;
		a = a*a;
	}
	return res;
}
/**************/
homura.init();要初始赋值的变量
matsize = nodenum;要初始赋值的变量
homura = homura^T;
/**************/
